﻿namespace Cos.Core.Attributes
{
    using System.Diagnostics;

    [Conditional("DEBUG")]
    public class DebugAttribute : InterceptorBaseAttribute
    {
        public override void OnExecuting(object sender, InterceptorExecutingContextEventArg e)
        {
            Debug.WriteLine("Executing '{0}'", (object)e.Input.MethodBase.Name);
        }

        public override void OnExecuted(object sender, InterceptorExecutedContextEventArg e)
        {
            Debug.WriteLine("OnExecuted '{0}'", (object)e.Input.MethodBase.Name);
        }

        public override void OnError(object sender, InterceptorErrorContextEventArg e)
        {
            Debug.WriteLine("OnError '{0}'", (object)e.Input.MethodBase.Name);
        }
    }
}
